﻿using ML.Entity;
using System.Collections.Generic;

namespace ML.IBusiness
{
    /// <summary>
    /// 产品管理业务接口
    /// </summary>
    public interface IProductBusiness
    {
        /// <summary>
        /// 根据查询条件查询产品信息
        /// </summary>
        /// <param name="productSearch">产品查询条件</param>
        /// <returns></returns>
        BaseResult<Pager<ProductResponse>> List(ProductSearch productSearch);

        /// <summary>
        ///  根据商户Id查询产品列表
        /// </summary>
        /// <param name="id">商户id</param>
        /// <returns></returns> 
        BaseResult<IEnumerable<ProductResponse>> GetListByMerchantId(string id, int pageindex, int pagesize);

        /// <summary>
        /// 根据产品Id查询产品信息
        /// </summary>
        /// <param name="id">产品Id</param>
        /// <returns></returns>
        BaseResult<ProductResponse> GetDetailById(string id);

        /// <summary>
        /// 添加产品
        /// </summary>
        /// <param name="entity">产品实体</param>
        /// <returns></returns>
        BaseResult<bool> Add(ProductEntity productEntity);

        /// <summary>
        /// 修改产品
        /// </summary>
        /// <param name="entity">产品实体</param>
        /// <returns></returns>
        BaseResult<bool> Update(ProductEntity productEntity);

        /// <summary>
        /// 上下架产品
        /// </summary>
        /// <param name="id">产品Id</param>
        /// <param name="ualmark">上下架标示(0-未上架，1-已上架)</param>
        /// <returns></returns>
        BaseResult<bool> UalMark(string id, int ualmark);

        /// <summary>
        /// 删除产品
        /// </summary>
        /// <returns></returns>
        BaseResult<bool> Delete(string id);
    }
}